//
//  FQOrganizationPhoneTableViewCell.swift
//  SwiftProject
//
//  Created by 董駸 on 2022/9/5.
//

import UIKit

class FQOrganizationPhoneTableViewCell: BaseTableViewCell {

    let imageV = UIImageView()
    let titleLb = QMUILabel(font: .rSFont(15), textColor: .color102)
    let phoneLb = QMUILabel(font: .rSFont(14), textColor: .color102)
    
    var model : String! {
        didSet {
            imageV.backgroundColor = .red
            titleLb.text = "123"
            phoneLb.text = "12345678"
        }
    }
    
    override var contentViewInset: UIEdgeInsets {
        .init(top: 0, left: 16, bottom: 0, right: 16)
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        contentView.backgroundColor = .white
        
        imageV.clipsToBounds = true
        imageV.layer.cornerRadius = 8
        contentView.addSubview(imageV)
        
        imageV.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.left.equalTo(20)
            make.size.equalTo(28)
        }
        
        contentView.addSubview(titleLb)
        titleLb.snp.makeConstraints { make in
            make.left.equalTo(imageV.snp.right).offset(8)
            make.centerY.equalToSuperview()
        }
        
        contentView.addSubview(phoneLb)
        phoneLb.snp.makeConstraints { make in
            make.right.equalTo(-20)
            make.centerY.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
